package com.gccloud.design.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gccloud.design.entity.BusinessMgntEntity;
import com.gccloud.design.vo.BwpBusinessMgntVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 实现功能【业务逻辑持久层】
 *
 * @author hu.hongdou
 * @date 2022/2/21
 */
@Mapper
public interface BusinessMgntDao extends BaseMapper<BusinessMgntEntity> {

    /**
     * 新增业务逻辑
     *
     * @param businessMgntEntity 业务逻辑实体类
     * @return 数量
     */
    int saveBusinessMgnt(BusinessMgntEntity businessMgntEntity);

    /**
     * 查询业务逻辑
     *
     * @param id        主键
     * @param logicName 名称
     * @return 列表
     */
    List<BwpBusinessMgntVo> getBusinessMgnt(@Param("id") Integer id, @Param("logicName") String logicName, Page<BwpBusinessMgntVo> page);

    /**
     * 删除业务逻辑
     *
     * @param id 主键
     * @return 数量
     */
    int deleteBusinessMgnt(@Param("id") Integer id);

    /**
     * 修改业务逻辑
     *
     * @param businessMgntEntity 业务逻辑实体类
     * @return 数量
     */
    int saveUpdateBusinessMgnt(BusinessMgntEntity businessMgntEntity);

    /**
     * 基于主键查询业务逻辑
     *
     * @param id 主键
     * @return 业务逻辑实体类
     */
    BusinessMgntEntity getBusinessMgntByPK(Integer id);
}
